package mest.dao.cxj;

import mest.VO.cxj.PlanCostorderVO;
import mest.entity.FinancialCostOrder;
import mest.entity.PlanCostOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 计划费用单
 */
@Mapper
public interface PlanCostOrderDao {

    /**
     * 添加计划费用单
     */
    Integer insertPlanCostOrder(@Param("pco") PlanCostOrder pco, @Param("theirDb") String theirDb);


    /**
     * 查询全部计划费用单
     * @return
     */
    List<PlanCostorderVO> selectAllPlanCostOrder(@Param("page") Integer page, @Param("limit") Integer limit,
                                                 @Param("status") Integer status, @Param("content") String content,
                                                 @Param("theirDb") String theirDb);


    /**
     * 费用单数量
     * @param theirDb
     * @return
     */
    Integer selectCountPlanCostOrder(@Param("status") Integer status, @Param("content") String content,
                                     @Param("theirDb") String theirDb);


    /**
     * 将单据转完成状态
     */
    Integer changeStatus(@Param("id") Integer id, @Param("theirDb") String theirDb);


    /**
     * 修改计划费用单信息
     */
    Integer modifyPlanCostOrder(@Param("pco") PlanCostOrder pco, @Param("theirDb") String theirDb);


    /**
     *  获取计划费用单信息
     * @param id
     * @param theirDb
     * @return
     */
    PlanCostOrder selectPlanCostOrderById(@Param("id")Integer id, @Param("theirDb")String theirDb);

    /**
     * 修改计划费用单金额
     * @param id
     * @param hasBennMoney
     * @param theirDb
     * @return
     */
    Integer updatePlanCostOrderByMoney(@Param("id")Integer id, @Param("hasBennMoney") BigDecimal hasBennMoney,
                                            @Param("theirDb")String theirDb);


}